package com.fastloan.mgt.customer.service;

import com.fastloan.common.model.CheckResult;
import com.fastloan.mgt.jx.model.vo.AppApproveVO;
import com.kawins.base.BaseService;
import com.fastloan.mgt.customer.model.CustomerAmount;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @author admins
 * createTime 2018/01/05
 */
public interface CustomerAmountService extends BaseService<CustomerAmount> {
    List<AppApproveVO> queryApprove(Map<String, Object> map);

    AppApproveVO queryApproveInfo(String applicationId);


    /**
     * 预客户是否申请过预授信
     *
     * @param customerId
     * @param productId
     * @return
     */
    CheckResult creditVerify(String customerId, String productId);

    /**
     * 客户是否可以继续申请预授信
     *
     * @param customerId
     * @return
     */
    Integer queryIfCredit(String customerId);

    /**
     * 验证产品预授信额度是否足够申请进件
     *
     * @param customerId
     * @param productId
     * @param applyAmount
     * @return
     */
    CheckResult verifyApplyAmount(String customerId, String productId, BigDecimal applyAmount);

    /**
     * 进件申请成功后更新预授信金额
     *
     * @param applicationId
     * @param applyAmount
     * @return
     */
    Integer changeCreditAmount(String applicationId, BigDecimal applyAmount);
}
